import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import './registerServiceWorker';

import '@/styles/default.less';
import '@/styles/user.less';

import Vant from 'vant';
import 'vant/lib/index.css';
import MintUI from 'mint-ui';
import 'mint-ui/lib/style.css';
import NutUI from '@nutui/nutui';
import '@nutui/nutui/dist/nutui.css';
import vueEventCalendar from 'vue-event-calendar';
import 'vue-event-calendar/dist/style.css';

import { Http } from '@/api/http/http';
import { Interceptors } from '@/api/interceptor/interceptor';
import { Util } from '@/utils/util/util';
import ActionSheet from '@/utils/util/ActionSheet';
import Modal from '@/utils/util/Modal';
import Loading from '@/utils/util/Loading';
import Prompt from '@/utils/util/Prompt';

import { AppComponents } from '@/app-register';
import { UserComponents } from '@/user-register';
import { PageComponents } from '@/page-register';


Vue.use(Vant);
Vue.use(MintUI);
Vue.use(NutUI);
Vue.use(vueEventCalendar, {locale: 'zh',color: '#26a2ff'});
Vue.use(AppComponents);
Vue.use(UserComponents);
Vue.use(PageComponents);
Interceptors.getInstance(router);
Vue.prototype.$http = Http.getInstance();
Vue.prototype.$util = Util;
Vue.prototype.$actionSheet = ActionSheet;
Vue.prototype.$modal = Modal;
Vue.prototype.$Loading = Loading;
Vue.prototype.$prompt = Prompt;


Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
